import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/login/index.vue'
import Home from '../views/home/index.vue'
import transferAccounts from "../views/transferAccounts/index.vue"
import update from "../views/update/index.vue"
import deal from "../views/deal/index.vue"
import deposit from "../views/deposit/index.vue"

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    name:'login',
    component: Login
  },{
    path:'/home',
    name:'home',
    component:Home,
    children:[
      {
        name: 'tra',
        path: 'tra',
        component: transferAccounts
      },{
        name: 'update',
        path: 'update',
        component: update
      },{
          name: 'deal',
        path: 'deal',
        component: deal
      },{
          name: 'deposit',
        path: 'deposit',
        component: deposit
      }
    ]
  }
  // {
  //   path: '/',
  //   name: 'home',
  //   component: HomeView
  // },
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
